console.log(1);
setTimeout(() => {
  console.log(2);
}, 0);
const p = new Promise((reject, resolve) => {
  console.log(4);
  resolve();
});
p.then(
  () => {
    console.log(5);
  },
  () => {
    console.log(6);
  }
);
console.log(7);
